home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / _defs.h next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  2.7 KB  |  100 lines

  1. /*  _defs.h
  2.  
  3.     Common definitions for pointer size and calling conventions.
  4.  
  5.     Calling conventions:
  6.     _RTLENTRY       Specifies the calling convention used by the RTL
  7.  
  8.     _USERENTRY      Specifies the calling convention the RTL expects user
  9.                     compiled functions to use (for callbacks)
  10.  
  11.     Export (and size for DOS) information:
  12.     _EXPCLASS       Exports class if building DLL version of library
  13.                     For DOS16 also provides size information
  14.  
  15.     _EXPDATA        Exports data if building DLL version of library
  16.  
  17.     _EXPFUNC        Exports function if building DLL version of library
  18.                     For DOS16 also provides size information
  19.  
  20.     _FAR            Promotes data pointers to far in DLLs (DOS16 only)
  21.  
  22.     Obsolete versions:
  23.     _Cdecl          Use _RTLENTRY
  24.     _CLASSTYPE      Use _EXPCLASS
  25.     _FARFUNC        Use _EXPFUNC
  26.     _FARCALL        Use _EXPFUNC and declare function explicity __far
  27. */
  28.  
  29. /*
  30.  *      C/C++ Run Time Library - Version 9.0
  31.  *
  32.  *      Copyright (c) 1991, 1998 by Borland International
  33.  *      All Rights Reserved.
  34.  *
  35.  */
  36. /* $Revision:   9.2  $ */
  37.  
  38. #if !defined(___DEFS_H)
  39. #define ___DEFS_H
  40.  
  41. #define _RTLENTRY  __cdecl
  42. #define _USERENTRY __cdecl
  43.  
  44. #if defined(__PAS__)
  45. #    define _RTLENTRYF  __pascal
  46. #    define _USERENTRYF __pascal
  47. #else
  48. #    define _RTLENTRYF  _RTLENTRY
  49. #    define _USERENTRYF _USERENTRY
  50. #endif
  51.  
  52. #define _FAR
  53. #if defined(_BUILDRTLDLL)
  54. #    define _EXPCLASS  __export
  55. #    define _EXPDATA   __export
  56. #    define _EXPFUNC   __export
  57. #    define _RWSTDBUILDDLL
  58. #elif defined(_RTLDLL)
  59. #    define _EXPCLASS  __import
  60. #    define _EXPDATA   __import
  61. #    define _EXPFUNC   __import
  62. #    define _RWSTDDLL
  63. #else
  64. #    define _EXPCLASS
  65. #    define _EXPDATA
  66. #    define _EXPFUNC
  67. #endif
  68.  
  69.  
  70. #define _EXPFUNC32  _EXPFUNC
  71. #define _EXPFUNC16
  72.  
  73.  
  74. #define _Cdecl      _RTLENTRY
  75. #define _CType      _RTLENTRYF
  76. #define _CLASSTYPE  _EXPCLASS
  77. #define _FARFUNC    _EXPFUNC
  78. #define _FARCALL    _EXPFUNC __far
  79.  
  80.  
  81. #if defined(__cplusplus)
  82. #   define _PTRDEF(name) typedef name _FAR * P##name;
  83. #   define _REFDEF(name) typedef name _FAR & R##name;
  84. #   define _REFPTRDEF(name) typedef name _FAR * _FAR & RP##name;
  85. #   define _PTRCONSTDEF(name) typedef const name _FAR * PC##name;
  86. #   define _REFCONSTDEF(name) typedef const name _FAR & RC##name;
  87.  
  88. #if 0
  89. /*********** Obsolete definitions for OWL 1.0 *************/
  90. #   define _CLASSDEF(name) class _EXPCLASS name; \
  91.            _PTRDEF(name) \
  92.            _REFDEF(name) \
  93.            _REFPTRDEF(name) \
  94.            _PTRCONSTDEF(name) \
  95.            _REFCONSTDEF(name)
  96. #endif /* 0 */
  97. #endif
  98.  
  99. #endif  /* ___DEFS_H */
  100.